import { dataType } from "element-plus/es/components/table-v2/src/common.mjs";
import { defineStore } from "pinia";
const widgetData: any = {
    themeColor: "#3f4854", // 全局主题颜色
    drawDefaultText: "三峡农夫智慧果园地图系统", // 默认绘制文本
    // topwidget控件显示控制
    topwidget: {
        coverage: false, // 图层控件按钮开关
        search: false, // 搜索控件按钮开关
        back: false, // 返回控件按钮开关
        tool: false, // 工具控件按钮开关
        sign: false, // 标记地图控件按钮开关
    },
    coverage: false, // 图层控件显示控制
    // 图层树右键菜单显示属性
    contextMenu: {
        show: false,
        X: 0,
        Y: 0,
        type: "folder",
        name: "",
    },
    adobeIllustrator: false, // 矢量工具对话框显示控制
    adobeIllustratorData: {}, // 矢量工具选中对话框数据
    adobeIllustratorItems: [], // 矢量工具绘制列表
    customStyleItem: [], // 矢量工具自定义样式列表
    drawItemData: {}, // 矢量工具选中对话框数据
    // 打印对话框显示控制
    print: {
        show: false,
        value: 1,
        valStyle: {
            width: "287mm",
            height: "195mm",
            transform: "matrix(1, 0, 0, 1, 0, 0)",
        },
        printImgUrl: "",
    },
    // 编辑器显示控制
    property: false, // 编辑器显示控制
    // 是否新增样式
    addStyle: false,
    // 属性编辑框打开后,是否修改了样式
    isEditorStyles: false,
    // 统计对话框
    statistics: {
        show: false,
        data: [
            {
                name: "标绘总数",
                value: 0,
                precision: 0,
                unit: "条",
                type: "total",
                dataType: "total",
            },
            {
                name: "文字总数",
                value: 0,
                precision: 0,
                unit: "条",
                type: "ordinaryText,facadeText,rotateText,marqueeText",
                dataType: "total",
            },
            {
                name: "线段总数",
                value: 0,
                precision: 0,
                unit: "条",
                type: "segment,curve,pipeline,corridor,rail,road",
                dataType: "total",
            },
            {
                name: "线段总长度",
                value: 0,
                precision: 2,
                unit: "m",
                type: "segment,curve,pipeline,corridor,rail,road",
                dataType: "length",
            },
            {
                name: "标点总数",
                value: 0,
                precision: 0,
                unit: "条",
                type: "iconPoint",
                dataType: "total",
            },
            {
                name: "平面显示单位",
                value: "1",
                type: "select",
            },
            {
                name: "二维平面总数",
                value: 0,
                precision: 0,
                unit: "条",
                type: "plane,rectangle,polygon,regular,circle,sector,ellipse",
                dataType: "total",
            },
            {
                name: "平面总面积",
                value: 0,
                pluralNum: 0,
                precision: 2,
                unit: "㎡",
                type: "plane,rectangle,polygon,regular,circle,sector,ellipse",
                dataType: "area",
            },
            {
                name: "三维立体总数",
                value: 0,
                precision: 0,
                unit: "条",
                type: "box,column,ellipticCylinder,cylinder,ellipsoid,radar",
                dataType: "total",
            },
            {
                name: "立体总体积",
                value: 0,
                precision: 2,
                unit: "m³",
                type: "box,column,ellipticCylinder,cylinder,ellipsoid,radar",
                dataType: "volume",
            },
            // {
            //     name: "3D模型总数",
            //     value: 0,
            //     type: "total",
            //     dataType: "total",
            // },
        ],
    },
    // 三维模型上传对话框
    uploadDialog: false,
    // 编辑时,用于更新数据的key
    editFormKey: new Date().getTime(),
};
export const widgetStore = defineStore("widget", {
    // other options...
    state: () => widgetData,
});
